package app.controllers.admin.stat;

import app.models.booking.DiningDialyStat;
import com.github.sog.controller.BasicController;
import com.github.sog.controller.datatables.core.DatatablesCriterias;
import com.jfinal.plugin.activerecord.Page;

/**
 * <p>
 * .餐饮统计
 * </p>
 *
 * @author liuhui
 * @version 1.0 2014-06-07 13:25
 * @since JDK 1.6
 */
public class DiningController extends BasicController {

    public void index(){
        render("index.ftl");
    }

    public void list() {
        final DatatablesCriterias criterias = getCriterias();
        String start_date = getPara("start_date");
        String end_date = getPara("end_date");
        String brand = getPara("brand");
        Page<DiningDialyStat> pageRt = DiningDialyStat.dao.datatable(criterias, brand,start_date, end_date);
        renderDataTables(pageRt, criterias);
    }

}
